<?php

namespace app\common\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        ['username', 'require|unique:user', '请输入用户名|用户名已经存在'],
        ['password', 'require|min:6|max:16|confirm:password1', '请输入密码|最小为6位|最大为16位|两次输入不一致'],
        ['email', 'email', '请填写正确的邮箱']
    ];
    protected $scene = [
        'add' => [
            'username', 'password', 'email'
        ],
    ];
}